<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 CalenderUI();
 link_js(array('jquery.fixedheader','bootstrap-typeahead'),'asset/js/');
 ?>
<!--<div class='container'>-->
     <div class="tabbable"> <!-- Only required for left/right tabs -->
	<?=$tab_header;?>
       <div class="tab-content" style=''>
	   <br>
            <div class="tab-pane" id="table1"></div>
            <div class="tab-pane active" id="table2">
			<?=$this->zetro_auth->allAuth($frm3,'list_cash_advance');?>
			<?=$this->zetro_auth->allAuth($list,'list_cash_advance');?></div></div>
       </div>
		<input type='hidden' id='row_aktif' value='<?=empty($_GET['ot'])?'n':$_GET['ot'];?>'/>
		<input type='hidden' id='rows' value='<?=base64_decode($this->session->userdata('menus'));?>'/>
    </div>
<?=$modal;?>
<!--</div>-->
<script language='javascript'>
$(document).ready(function(e) {
	$('div.tab-content').css('height',(screen.availHeight-275));
	$('#from_tgl').datepicker();
	$('#from_tgl').datepicker("option","dateFormat","dd/mm/yy");
	$('#upto_tgl').datepicker();
	$('#upto_tgl').datepicker("option","dateFormat","dd/mm/yy");
	tglNow('#from_tgl');
	$('#c_cari').click(function(){_show_data('1');});
	$('#ok').click(function(){_show_data ('1');});
	$('#print').click(function(){_print_doc();});
	$('#id_united').html("<?=$lok;?>").val('1').select();
	_show_data('');

})
function _show_data(tp)
{
	show_indicator('NewList',6);
	$.post('gettransaksicash',$('#frm1').serialize()+'&ot='+$('#row_aktif').val(),function(result)
	{
		$('#NewList tbody').html(result);
		(tp=='')?
		$('#NewList').fixedHeader({'width':(screen.availWidth-50),'height':(screen.availHeight-370)}):'';
	})
}

function _print_doc()
{
	$.post('printlapoperasional',$('#frm1').serialize(),
	function(result)
	{
		$('#prv').attr('src',result);
		$('#PrintPrev .modal-body').css({'width':(screen.availWidth-170),'height':(screen.availHeight-205),'overflow':'auto'});
		$('#PrintPrev')
			.css({'left':'25%','width':(screen.availWidth-150),'height':(screen.availHeight-150)})
			.modal('show');
	})
	
}
</script>